#include "thread.h"
#include <stdio.h>
#include <windows.h>
class CPrintThread : public CThread
{
public:
    CPrintThread() : CThread(0)
    {
    }
    void Execute()
    {
        printf("print thread\n");
        m_ret_val = 100;
    }
};

int main()
{
    CThread* t = new CPrintThread;
    t->Run();
    t->WaitFor();
    printf("thread_id=%ld\n", t->GetThreadId());
    printf("ret=%d\n", t->GetResult());
    delete t;
    getchar();
    return 0;
}